<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script src="./Promise.js?a=1"></script>
    <script>
        // 1- 成功回调以及失败回调是异步调用的
        // 2- then函数返回的是一个新promise实例对象
        const p1 = new Promise((resolve,reject)=>{
            resolve(100);
            // reject(200);
            throw "异常"
        })
        // console.log(p1);
        const p2 = p1.then(function(value){
            console.log("成功回调",value);
        },function(reason){
            console.log("失败回调",reason);
        })
        console.log("over",p2===p1);// false
    </script>
</body>
</html>